<?php defined('SYSPATH') OR die('No direct access allowed.'); ?>
<br>
<div class="box" style="text-align: left;">
	<form action="<?=url::base()?>index.php/contact_us/insert"
		enctype="application/x-www-form-urlencoded" method="post">
		<table width="100%" cellspacing="2" cellpadding="0" border="0">
			<tbody>
			<?php if($send_data!=NULL && $send_data=='Y'){?>
			<tr>
					<td class="fixtext_label" align="right">
					</td>
					<td><h1 class="entry-title" style="font-size: 13pt;color: red;">ส่งข้อมูลเรียบร้อยแล้ว</h1>
					<br><a href="<?php echo url::base(FALSE).'index.php'?>">หน้าหลัก</a><br></td>
				</tr>
			<?php }?>
				<tr>
					<td class="fixtext_label" align="right">
					</td>
					<td><h1 class="entry-title" style="font-size: 13pt">ติดต่อเรา..</h1></td>
				</tr>
				<tr>
					<td class="fixtext_label" align="right"></td>
					<td><select style="width: 50%" name="contact_type_id" >
							<option value="0">-- contact_types --</option>
							<?php
							foreach ( $contact_types as $obj) {
								echo "<option value=\"$obj->id\">$obj->name</option>";
							}?>
						</select></td>
				</tr>
				<tr>
					<td class="fixtext_label" align="right">ต้องการติดต่อเรื่อง :</td>
					<td><input type="text" style="width: 90%; height: 25px;" name="title"></td>
				</tr>
				<tr>
					<td class="fixtext_label" align="right">ชื่อ-สกุล :</td>
					<td><input type="text" style="width: 90%; height: 25px;" name="full_name"></td>
				</tr>
				<tr>
					<td class="fixtext_label" align="right">e-mail :</td>
					<td><input type="text" style="width: 90%; height: 25px;" name="email"></td>
				</tr>
				<tr>
					<td class="fixtext_label" align="right" valign="top">รายละเอียด :</td>
					<td><textarea style="width: 90%; height: 200px;" name="description" ></textarea></td>
				</tr>
				<tr>
					<td class="fixtext_label" style="color: red;" valign="top" align="right">*ยืนยันตัวตน :</td>
					<td style=" height: 25px;"><?php 
					echo '<p >';
					echo $captcha->render(); // Shows the Captcha challenge (image/riddle/etc)
					echo '</p>';
					echo form::input('captcha_response');
					?>
					</td>
				</tr>
				<tr>
					<td class="fixtext_label" style="color: red;" align="right"></td>
					<td align="left">
					<br><br>
							<input class="form_submit" style="width: 200px; height: 25px;"
								type="submit" value=" ส่งติดต่อ " id="search_bkkzone"
								name="submit">
							<input class="form_submit" style="width: 200px; height: 25px;"
								type="reset" value=" ยกเลิก " 
								name="cancel">
					</td>
				</tr>
			</tbody>
		</table>
	</form>
</div>
